import React, { Component } from 'react';
import {
    StyleSheet,
    View,
    Text,
    Image,
} from 'react-native';

import PxToDp from '../../utils/PxToDp';
import FontFamilys from '../../utils/FontFamilys';

class Loading extends Component {
  render() {
    return (
      <View style={styles.container}>
        <View style={styles.loading}>
          <Image style={styles.icon} source={require('../../img/home/update.png')} />
          <Text style={styles.loadingTitle}>正在使劲加载中…</Text>
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    position: 'absolute',
    top: 0,
    left: 0,
    right: 0,
    bottom: 0,
    justifyContent: 'center',
    alignItems: 'center',
  },
  loading: {
    justifyContent: 'center',
    alignItems: 'center',
  },
  loadingTitle: {
    marginTop: PxToDp(18),
    fontSize: PxToDp(16),
    fontFamily: FontFamilys(),
    color: '#999999',
  },
  icon: {
    width: PxToDp(115),
    height: PxToDp(60),
  },
});
export default Loading;
